package outil;

public class Et implements Predicat {

    private final Predicat pPredicat1;
    private final Predicat pPredicat2;

    public final static Predicat instance(Predicat pPredicat1, Predicat pPredicat2) {
        return new Et(pPredicat1, pPredicat2);
    }

    public Et(Predicat pPredicat1, Predicat pPredicat2) {
        this.pPredicat1 = pPredicat1;
        this.pPredicat2 = pPredicat2;
    }

    public boolean eval() {
        return pPredicat1.eval() && pPredicat2.eval();
    }
}
